package domain;

// Generated 16.Eki.2012 16:28:17 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * ProjectInfoDAO generated by hbm2java
 */
@Entity
@Table(name = "IBTOOLS_PROJECT_INFO", schema = "T32556")
public class ProjectInfoDAO implements java.io.Serializable {

	private Long oid;
	private boolean status;
	private String projectName;
	private String projectCode;
	private String userCode;
	private List<PaneNodeDAO> nodes; 

	public ProjectInfoDAO() {
	}
	
	

	public ProjectInfoDAO(Long oid) {
		super();
		this.oid = oid;
	}



	public ProjectInfoDAO(boolean status, String projectName) {
		this.status = status;
		this.projectName = projectName;
	}

	public ProjectInfoDAO(boolean status, String projectName,
			String projectCode, String userCode, Set<PaneNodeDAO> paneNodeList) {
		this.status = status;
		this.projectName = projectName;
		this.projectCode = projectCode;
		this.userCode = userCode;
	}

	@SequenceGenerator(name = "generator")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "OID", unique = true, nullable = false, scale = 0)
	public Long getOid() {
		return this.oid;
	}

	public void setOid(Long oid) {
		this.oid = oid;
	}

	@Column(name = "STATUS", nullable = false, precision = 1, scale = 0)
	public boolean isStatus() {
		return this.status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	@Column(name = "PROJECT_NAME", nullable = false, length = 80)
	public String getProjectName() {
		return this.projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	@Column(name = "PROJECT_CODE", length = 10)
	public String getProjectCode() {
		return this.projectCode;
	}

	public void setProjectCode(String projectCode) {
		this.projectCode = projectCode;
	}

	@Column(name = "USER_CODE", length = 10)
	public String getUserCode() {
		return this.userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	

	@OneToMany(cascade = CascadeType.ALL, mappedBy = "project")
	public List<PaneNodeDAO> getNodes() {
		return nodes;
	}

	public void setNodes(List<PaneNodeDAO> nodes) {
		this.nodes = nodes;
	}
}
